package com.hyfrogx.modules.manage.service.chargePayRecord;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyfrogx.common.exception.ServiceException;
import com.hyfrogx.common.utils.QueryExt;
import com.hyfrogx.modules.app.form.ios.IosForm;
import com.hyfrogx.modules.manage.entity.chargePayRecord.ChargePayRecordEntity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author: Luo
 * @Date: 2019/12/5 17:48
 */
public interface ChargePayRecordService extends IService<ChargePayRecordEntity> {

    /**
     * 支付宝回调
     * @param request
     * @param response
     * @return
     */
    String notify(HttpServletRequest request, HttpServletResponse response);

    /**
     * ios充值
     */
    Boolean iosCharge(IosForm form) throws Exception;

    /**
     * 移动端取消订单
     * @param id
     */
    void cancleOrderById(Integer id) throws ServiceException;

    /**
     * 客户端充值记录列表
     * @param queryExt
     * @return
     */
    Page getPayRecordList(QueryExt queryExt);

    /**
     * 支付完成修改订单状态
     * @param payRecordEntity
     * @throws Exception
     */
    void upDateByOutTradeNo(ChargePayRecordEntity payRecordEntity) throws Exception;


    /**
     * 管理后台分页查询充值记录
     * @param queryExt
     * @return
     */
    Page findByPage(QueryExt queryExt);

}
